//
//  ViewController.m
//  aa
//
//  Created by zhouzhenghua on 2016/12/15.
//  Copyright © 2016年 前隆金融. All rights reserved.
//

#import "ViewController.h"
#import "NextViewController.h"
#import <objc/runtime.h>

@interface ViewController ()<UIWebViewDelegate>
@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    [self.view addSubview:self.myWeb];
    NSString *sjd = @"https://m.shoujidai.com";
    NSURL *sjdurl = [NSURL URLWithString:sjd];
    NSURLRequest *sjdRequest = [NSURLRequest requestWithURL:sjdurl];
    [self.myWeb loadRequest:sjdRequest];
    
}

- (BOOL)webView:(UIWebView *)webView shouldStartLoadWithRequest:(NSURLRequest *)request navigationType:(UIWebViewNavigationType)navigationType {
    return YES;
}
- (void)webViewDidStartLoad:(UIWebView *)webView {
    
}
- (void)webViewDidFinishLoad:(UIWebView *)webView {
    
}
- (void)webView:(UIWebView *)webView didFailLoadWithError:(NSError *)error {
    
}

-(UIWebView *)myWeb {
    if (_myWeb == nil) {
        _myWeb = [[UIWebView alloc]init];
        _myWeb.frame = CGRectMake(0, 0, self.view.frame.size.width, self.view.frame.size.height);
        _myWeb.delegate = self;
    }
    return _myWeb;
}



@end
